<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="box">
        
    </div>
</body>
<script>
    document.getElementById("box").innerHTML=
    `
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
    </ul>
    `//模板字符串
    let x=10,y=20;
    console.log(`${x}+${y}=${x+y}`);//10+20=30
    let obj = {a:10,b:20}
    console.log(`${obj.a+obj.b}`);//30
    function fn(){
        return "hello 2022"
    }
    console.log(`${fn()}`);//hello 2022

    let url = "https://www.baidu.com/index.html/123123";
    if(url.startsWith("http://")){
        console.log("普通的网址");
    }else if(url.startsWith("https://")){
    console.log("加密验证的网址");
    }else if(url.startsWith("git://")){
    console.log("git的网址");
    }else if(url.startsWith("svn://")){
    console.log("svn的网址");
    }else{
        console.log("其他的网址");
    }
    
    let a=8
    if(a>1){
        console.log("1");//1
    }else if(a>2){
        console.log("2");
    }else if(a>5){
        console.log("5");
    }else if(a>10){
        console.log("10");
    }else{
        console.log("其他的数字");
    }

    //开关语句 switch 穿透
    var b =10;
    switch(b){
        case 1:
            console.log(1);
            break;
    }
</script>
</html>